package com.xiangwushuo.framework.activity.start

import android.app.Application
import android.content.Intent
import androidx.databinding.ObservableField
import com.lib.common.base.mvvm.CommonActivityViewModel
import com.xiangwushuo.framework.activity.main.MainActivity

/**
 * Copyright (C), 2019-2019
 * FileName: StartViewModel
 * Author: Kevin
 * Date: 2019-12-31 17:31
 * Description: 启动页面的 ViewModel
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
 */
class StartViewModel(application: Application) : CommonActivityViewModel(application) {

    /**
     * xml 文件直接调用的变量
     */
    var mText = ObservableField<String>()

    override fun initData(intent: Intent?) {
        sendEvent(StartActivity.EVENT_XXX, "extraParam")
    }

    /**
     * 跳转到下一页
     */
    fun goToNextPage() {
        startActivity(MainActivity::class.java)
        finish()

//        startActivity(TestActivity::class.java)
//        finish()
    }
}